package com.zzyl.service.impl;

import com.zzyl.mapper.NursingProjectPlanMapper;
import com.zzyl.service.NursingProjectPlanService;
import com.zzyl.vo.NursingProjectPlanVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW)
public class NursingProjectPlanServiceImpl implements NursingProjectPlanService {
    @Autowired
    private NursingProjectPlanMapper nursingProjectPlanMapper;

    @Override
    public void insertNursingProjectPlan(List<NursingProjectPlanVo> projectPlans) {
        nursingProjectPlanMapper.insertNursingProjectPlan(projectPlans);
    }

    @Override
    public List<NursingProjectPlanVo> selectNursingProjectPlanById(Long id) {
       return nursingProjectPlanMapper.selectNursingProjectPlanById(id);

    }

    @Override
    public void deleteNursingProjectPlanById(Long id) {
        nursingProjectPlanMapper.deleteNursingProjectPlanById(id);
    }
}
